import {
    createRouter,
    createWebHistory
} from 'vue-router'


const routes = [{
        path: '/',
        component: () =>
            import('../views/login.vue'),
    }, {
        path: '/admin/main',
        component: () =>
            import('../views/page-admin/main.vue'),
        children: [{
            path: '/admin/home',
            component: () =>
                import('../views/page-admin/home.vue'),
            meta: {
                title: '首页'
            }
        }, {
            path: '/admin/serial-num',
            component: () =>
                import('../views/page-admin/serial-num.vue'),
            meta: {
                title: '序列号'
            }
        }, {
            path: '/admin/customer',
            component: () =>
                import('../views/page-admin/customer.vue'),
            meta: {
                title: '客户'
            }
        }, {
            path: '/admin/agent',
            component: () =>
                import('../views/page-admin/agent.vue'),
            meta: {
                title: '代理商'
            }
        }, {
            path: '/admin/add-agent',
            component: () =>
                import('../views/page-admin/add-agent.vue'),
            meta: {
                title: '添加代理商'
            }
        }, {
            path: '/admin/help-doc',
            component: () =>
                import('../views/page-admin/help-doc.vue'),
            meta: {
                title: '帮助文档'
            }
        }, {
            path: '/admin/add-help-doc',
            name: 'add-help-doc',
            component: () =>
                import('../views/page-admin/add-help-doc.vue'),
            meta: {
                title: '添加文档'
            }
        }, {
            path: '/admin/add-customer',
            name: 'add-customer',
            component: () =>
                import('../views/page-admin/add-customer.vue'),
            meta: {
                title: '添加客户'
            }
        }, {
            path: '/admin/device-service',
            name: 'admin-device-service',
            component: () =>
                import('../views/page-all/device-service.vue'),
            meta: {
                title: '设备资料'
            }
        }, {
            path: '/admin/update-pwd',
            name: 'admin-update-pwd',
            component: () =>
                import('../views/page-all/update-pwd.vue'),
            meta: {
                title: '修改密码'
            }
        }, {
            path: '/admin/add-device-service',
            name: 'admin-add-device-service',
            component: () =>
                import('../views/page-all/add-device-service.vue'),
            meta: {
                title: '添加设备资料'
            }
        }, {
            path: '/admin/dvservice-home',
            name: 'admin-dvservice-home',
            component: () =>
                import('../views/page-all/dvservice-home.vue'),
            meta: {
                title: '设备资料'
            }
        }, {
            path: '/admin/video-preview',
            name: 'admin-video-preview',
            component: () =>
                import('../views/page-all/video-preview.vue'),
            meta: {
                title: '服务手册'
            }
        }, {
            path: '/admin/image-preview-list',
            name: 'admin-image-preview-list',
            component: () =>
                import('../views/page-all/image-preview-list.vue'),
            meta: {
                title: '服务手册'
            }
        }, {
            path: '/admin/program-list',
            name: 'admin-program-list',
            component: () =>
                import('../views/page-admin/program-list.vue'),
            meta: {
                title: '升级列表'
            }
        }, {
            path: '/admin/add-program',
            name: 'admin-add-program',
            component: () =>
                import('../views/page-admin/add-program.vue'),
            meta: {
                title: '添加升级程序'
            }
        }]
    }, {
        path: '/main',
        component: () =>
            import('../views/page-customer/main.vue'),
        meta: {
            title: ''
        },
        children: [{
                path: '/home',
                component: () =>
                    import('../views/page-customer/home.vue'),
                meta: {
                    title: '首页'
                }
            },
            {
                path: '/device-list',
                name: 'device-list',
                component: () =>
                    import('../views/page-customer/device-list.vue'),
                meta: {
                    title: '设备列表'
                }
            },
            {
                path: '/workshop',
                component: () =>
                    import('../views/page-customer/workshop.vue'),
                meta: {
                    title: '车间'
                }
            },
            {
                path: '/factory',
                component: () =>
                    import('../views/page-customer/factory.vue'),
                meta: {
                    title: '工厂'
                }
            },
            {
                path: '/gateway',
                component: () =>
                    import('../views/page-customer/gateway.vue'),
                meta: {
                    title: '网关'
                }
            },
            {
                name: 'add-gateway',
                path: '/add-gateway',
                component: () =>
                    import('../views/page-customer/add-gateway.vue'),
                meta: {
                    title: '添加网关'
                }
            },
            {
                path: '/uhf',
                component: () =>
                    import('../views/page-customer/uhf.vue'),
                meta: {
                    title: '网关'
                }
            },
            {
                name: 'add-uhf',
                path: '/add-uhf',
                component: () =>
                    import('../views/page-customer/add-uhf.vue'),
                meta: {
                    title: '添加读卡器'
                }
            },

            {
                path: '/lend-record',
                component: () =>
                    import('../views/page-customer/lend-record.vue'),
                meta: {
                    title: '借出记录'
                }
            },
            {
                path: '/borrow-record',
                component: () =>
                    import('../views/page-customer/borrow-record.vue'),
                meta: {
                    title: '借入记录'
                }
            },
            {
                path: '/add-lend-record',
                component: () =>
                    import('../views/page-customer/add-lend-record.vue'),
                meta: {
                    title: '添加借出记录'
                }
            },
            {
                path: '/add-borrow-record',
                component: () =>
                    import('../views/page-customer/add-borrow-record.vue'),
                meta: {
                    title: '添加借出记录'
                }
            },
            {
                path: '/scrap-device',
                component: () =>
                    import('../views/page-customer/scrap-device.vue'),
                meta: {
                    title: '报废设备'
                }
            },
            {
                path: '/capital-device',
                component: () =>
                    import('../views/page-customer/capital-device.vue'),
                meta: {
                    title: '大修设备'
                }
            },
            {
                path: '/repair-order',
                component: () =>
                    import('../views/page-customer/repair-order.vue'),
                meta: {
                    title: '报修工单'
                }
            },
            {
                path: '/repair-info',
                name: 'repair-info',
                component: () =>
                    import('../views/page-customer/repair-info.vue'),
                meta: {
                    title: '报修工单详情'
                }
            },
            {
                path: '/workshop-map',
                component: () =>
                    import('../views/page-customer/workshop-map.vue'),
                meta: {
                    title: '车间地图'
                }
            },
            {
                path: '/electric-monitor',
                component: () =>
                    import('../views/page-customer/electric-monitor.vue'),
                meta: {
                    title: '能耗监测'
                }
            },
            {
                path: '/alarm-news',
                component: () =>
                    import('../views/page-customer/alarm-news.vue'),
                meta: {
                    title: '报警消息'
                }
            },
            {
                path: '/user-info',
                component: () =>
                    import('../views/page-customer/user-info.vue'),
                meta: {
                    title: '报警消息'
                }
            },
            {
                path: '/user-list',
                component: () =>
                    import('../views/page-customer/user-list.vue'),
                meta: {
                    title: '员工'
                }
            },
            {
                path: '/add-user',
                name: 'add-user',
                component: () =>
                    import('../views/page-customer/add-user.vue'),
                meta: {
                    title: '添加员工'
                }
            },
            {
                path: '/space-device',
                component: () =>
                    import('../views/page-customer/space-device.vue'),
                meta: {
                    title: '备车地图'
                }
            },
            {
                path: '/add-workshop',
                name: 'ADD_WORKSHOP',
                component: () =>
                    import('../views/page-customer/add-workshop.vue'),
                meta: {
                    title: '添加车间'
                }
            },
            {
                path: '/pro-line',
                name: 'PRO_LINE',
                component: () =>
                    import('../views/page-customer/pro-line.vue'),
                meta: {
                    title: '组列表'
                }
            },
            {
                path: '/add-pro-line',
                name: 'ADD_PRO_LINE',
                component: () =>
                    import('../views/page-customer/add-pro-line.vue'),
                meta: {
                    title: '添加组'
                }
            },
            {
                path: '/update-pro-line',
                name: 'UPDATE_PRO_LINE',
                component: () =>
                    import('../views/page-customer/update-pro-line.vue'),
                meta: {
                    title: '添加组'
                }
            },
            {
                path: '/edit-device',
                name: 'EDIT_DEVICE',
                component: () =>
                    import('../views/page-customer/edit-device.vue'),
                meta: {
                    title: '编辑设备'
                }
            },
            {
                path: '/iot-device',
                name: 'IOT_DEVICE',
                component: () =>
                    import('../views/page-customer/iot-device.vue'),
                meta: {
                    title: '编辑设备'
                }
            },
            {
                path: '/device-temp',
                name: 'device-temp',
                component: () =>
                    import('../views/page-customer/device-temp.vue'),
                meta: {
                    title: '设备温度'
                }
            },
            {
                path: '/iot-data',
                name: 'IOT_DATA',
                component: () =>
                    import('../views/page-customer/iot-data.vue'),
                meta: {
                    title: '编辑设备'
                }
            },
            {
                path: '/use-report',
                name: 'use-report',
                component: () =>
                    import('../views/page-customer/use-report.vue'),
                meta: {
                    title: '使用率报表'
                }
            },
            {
                path: '/temp-report',
                name: 'temp-report',
                component: () =>
                    import('../views/page-customer/temp-report.vue'),
                meta: {
                    title: '温度报表'
                }
            },
            {
                path: '/temp-report1',
                name: 'temp-report1',
                component: () =>
                    import('../views/page-customer/temp-report1.vue'),
                meta: {
                    title: '温度报表1'
                }
            },
            {
                path: '/avuse-report',
                name: 'avuse-report',
                component: () =>
                    import('../views/page-customer/avuse-report.vue'),
                meta: {
                    title: '使用率汇总表'
                }
            },
            {
                path: '/add-station',
                name: 'ADD_STATION',
                component: () =>
                    import('../views/page-customer/add-station.vue'),
                meta: {
                    title: '添加工位'
                }
            },
            {
                path: '/station',
                name: 'STATION',
                component: () =>
                    import('../views/page-customer/station.vue'),
                meta: {
                    title: '工位列表'
                }
            },
            {
                path: '/store',
                name: 'STORE',
                component: () =>
                    import('../views/page-customer/store.vue'),
                meta: {
                    title: '仓库列表'
                }
            },
            {
                path: '/add-store',
                name: 'ADD_STORE',
                component: () =>
                    import('../views/page-customer/add-store.vue'),
                meta: {
                    title: '添加仓库'
                }
            },
            {
                path: '/video-monitor',
                name: 'video-monitor',
                component: () =>
                    import('../views/page-customer/video-monitor.vue'),
                meta: {
                    title: '视频监控'
                }
            },
            {
                path: '/buy-part',
                name: 'buy-part',
                component: () =>
                    import('../views/page-customer/buy-part.vue'),
                meta: {
                    title: '购买零件'
                }
            },
            {
                path: '/add-scrap-device',
                name: 'ADD_SCRAP_DEVICE',
                component: () =>
                    import('../views/page-customer/add-scrap-device.vue'),
                meta: {
                    title: '添加报废设备'
                }
            },
            {
                path: '/abnormal-device',
                name: 'abnormal-device',
                component: () =>
                    import('../views/page-customer/abnormal-device.vue'),
                meta: {
                    title: '异常设备'
                }
            },
            {
                path: '/add-device',
                name: 'ADD_DEVICE',
                component: () =>
                    import('../views/page-customer/add-device.vue'),
                meta: {
                    title: '添加设备'
                }
            }, {
                path: '/use-record',
                name: 'USE_RECORD',
                component: () =>
                    import('../views/page-customer/use-record.vue'),
                meta: {
                    title: '使用记录'
                }
            },
            {
                path: '/param-list',
                name: 'PARAM_LIST',
                component: () =>
                    import('../views/page-customer/param-list.vue'),
                meta: {
                    title: '设备参数'
                }
            },
            {
                path: '/craft',
                name: 'CRAFT',
                component: () =>
                    import('../views/page-customer/craft.vue'),
                meta: {
                    title: '工序'
                }
            },
            {
                path: '/notice',
                name: 'notice',
                component: () =>
                    import('../views/page-customer/notice.vue'),
                meta: {
                    title: '通知'
                }
            },
            {
                path: '/add-notice',
                name: 'add-notice',
                component: () =>
                    import('../views/page-customer/add-notice.vue'),
                meta: {
                    title: '添加通知'
                }
            },
            {
                path: '/add-craft',
                name: 'ADD_CRAFT',
                component: () =>
                    import('../views/page-customer/add-craft.vue'),
                meta: {
                    title: '添加工序'
                }
            },
            {
                path: '/add-arrange-order',
                name: 'add-arrange-order',
                component: () =>
                    import('../views/page-customer/add-arrange-order.vue'),
                meta: {
                    title: '添加排单计划'
                }
            },
            {
                path: '/healthy-report',
                name: 'HEALTHY_REPORT',
                component: () =>
                    import('../views/page-customer/healthy-report.vue'),
                meta: {
                    title: 'XXXX'
                }
            },
            {
                path: '/repair-record',
                name: 'repair-record',
                component: () =>
                    import('../views/page-customer/repair-record'),
                meta: {
                    title: '维修记录'
                }
            },
            {
                path: '/maintain',
                name: 'maintain',
                component: () =>
                    import('../views/page-customer/maintain'),
                meta: {
                    title: '设备保养'
                }
            },
            {
                path: '/style',
                name: 'style',
                component: () =>
                    import('../views/page-customer/style'),
                meta: {
                    title: '款式管理'
                }
            },
            {
                path: '/add-style',
                name: 'add-style',
                component: () =>
                    import('../views/page-customer/add-style'),
                meta: {
                    title: '添加款式'
                }
            },
            {
                path: '/style-craft',
                name: 'style-craft',
                component: () =>
                    import('../views/page-customer/style-craft'),
                meta: {
                    title: '款式工序'
                }
            },
            {
                path: '/arrange-order',
                name: 'arrange-order',
                component: () =>
                    import('../views/page-customer/arrange-order'),
                meta: {
                    title: '资源配置'
                }
            },
            {
                path: '/pro-order',
                name: 'pro-order',
                component: () =>
                    import('../views/page-customer/pro-order'),
                meta: {
                    title: '生产单'
                }
            },
            {
                path: '/pro-plan',
                name: 'pro-plan',
                component: () =>
                    import('../views/page-customer/pro-plan'),
                meta: {
                    title: '排单计划'
                }
            },
            {
                path: '/add-pro-order',
                name: 'add-pro-order',
                component: () =>
                    import('../views/page-customer/add-pro-order'),
                meta: {
                    title: '添加生产单'
                }
            },
            {
                path: '/accessory-order',
                name: 'accessory-order',
                component: () =>
                    import('../views/page-customer/accessory-order'),
                meta: {
                    title: '辅料加工'
                }
            },
            {
                path: '/add-accessory-order',
                name: 'add-accessory-order',
                component: () =>
                    import('../views/page-customer/add-accessory-order'),
                meta: {
                    title: '添加辅料排单'
                }
            },
            {
                path: '/part-list',
                name: 'part-list',
                component: () =>
                    import('../views/page-customer/part-list'),
                meta: {
                    title: '采购零件列表'
                }
            },
            {
                path: '/machine-repair',
                name: 'machine-repair',
                component: () =>
                    import('../views/page-customer/machine-repair'),
                meta: {
                    title: '机修技能'
                }
            },
            {
                path: '/turner-skill',
                name: 'turner-skill',
                component: () =>
                    import('../views/page-customer/turner-skill'),
                meta: {
                    title: '车工技能'
                }
            },
            {
                path: '/device-allocated',
                name: 'device-allocated',
                component: () =>
                    import('../views/page-customer/device-allocated'),
                meta: {
                    title: '设备配置'
                }
            },
            {
                path: '/device-kind',
                name: 'device-kind',
                component: () =>
                    import('../views/page-customer/device-kind'),
                meta: {
                    title: '设备配置'
                }
            },
            {
                path: '/device-location',
                name: 'device-location',
                component: () =>
                    import('../views/page-customer/device-location'),
                meta: {
                    title: '设备位置'
                }
            }, {
                path: '/add-device-kind',
                name: 'add-device-kind',
                component: () =>
                    import('../views/page-customer/add-device-kind'),
                meta: {
                    title: '添加机器名称'
                }
            }, {
                path: '/std-sew',
                name: 'std-sew',
                component: () =>
                    import('../views/page-customer/std-sew.vue'),
                meta: {
                    title: '工时详情'
                }
            }, {
                path: '/history-dur',
                name: 'history-dur',
                component: () =>
                    import('../views/page-customer/history-dur.vue'),
                meta: {
                    title: '历史工时'
                }
            },
            {
                path: '/monitor-3',
                name: 'monitor-3',
                component: () =>
                    import('../views/page-customer/monitor-3.vue'),
                meta: {
                    title: '缝纫波段'
                }
            },
            {
                path: '/monitor-4',
                name: 'monitor-4',
                component: () =>
                    import('../views/page-customer/monitor-4.vue'),
                meta: {
                    title: '缝纫波段'
                }
            },
            {
                path: '/monitor-5',
                name: 'monitor-5',
                component: () =>
                    import('../views/page-customer/monitor-5.vue'),
                meta: {
                    title: '缝纫波段'
                }
            },

            {
                path: '/monitor-6',
                name: 'monitor-6',
                component: () =>
                    import('../views/page-customer/monitor-6.vue'),
            },
            {
                path: '/customer/device-service',
                name: 'customer-device-service',
                component: () =>
                    import('../views/page-all/device-service.vue'),
                meta: {
                    title: '设备资料'
                }
            }, {
                path: '/customer/add-device-service',
                name: 'customer-add-device-service',
                component: () =>
                    import('../views/page-all/add-device-service.vue'),
                meta: {
                    title: '添加设备资料'
                }
            }, {
                path: '/customer/update-pwd',
                name: 'customer-update-pwd',
                component: () =>
                    import('../views/page-all/update-pwd.vue'),
                meta: {
                    title: '修改密码'
                }
            }, {
                path: '/customer/dvservice-home',
                name: 'customer-dvservice-home',
                component: () =>
                    import('../views/page-all/dvservice-home.vue'),
                meta: {
                    title: '设备资料'
                }
            }, {
                path: '/customer/video-preview',
                name: 'customer-video-preview',
                component: () =>
                    import('../views/page-all/video-preview.vue'),
                meta: {
                    title: '视频'
                }
            }, {
                path: '/customer/image-preview-list',
                name: 'customer-image-preview-list',
                component: () =>
                    import('../views/page-all/image-preview-list.vue'),
                meta: {
                    title: '图片'
                }
            },
            {
                path: '/device-board',
                component: () =>
                    import('../views/page-customer/device-board.vue'),
                meta: {
                    title: '设备看板'
                },
                children: [{
                    path: '/monitor-1',
                    name: 'MONITOR_1',
                    component: () =>
                        import('../views/page-customer/monitor-1.vue'),
                    meta: {
                        title: '数据看板-1'
                    }
                }, {
                    path: '/monitor-2',
                    name: 'MONITOR-2',
                    component: () =>
                        import('../views/page-customer/monitor-2.vue'),
                    meta: {
                        title: '数据看板-2'
                    }
                }]

            },
        ]
    },

]

const router = createRouter({
    history: createWebHistory(process.env.BASE_URL),
    routes
})



export default router